travelmate: release 1.3.3
authorDirk Brenken <[email protected]>
Tue, 22 Jan 2019 15:05:30 +0000 (16:05 +0100)
committerDirk Brenken <[email protected]>
Tue, 22 Jan 2019 15:05:30 +0000 (16:05 +0100)
* re-fine/optimize re-connection logic in 'ProActive' mode,
  prevent needless ubus calls

Signed-off-by: Dirk Brenken <[email protected]>
net/travelmate/Makefile
net/travelmate/files/travelmate.sh

index 302b7928a4041e14a1650c35262f8573b6c77b4e..d80ac4fdf73f485de8d8e17ce992a8c8a6847efe 100644 (file)
@@ -6,7 +6,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=travelmate
-PKG_VERSION:=1.3.2
+PKG_VERSION:=1.3.3
 PKG_RELEASE:=1
 PKG_LICENSE:=GPL-3.0+
 PKG_MAINTAINER:=Dirk Brenken <[email protected]>
index b5bdf189cdabbd0973505b7b234e4570d60c035f..4fa1c64967ffa31ddc095a6f0f643dc6068c7611 100755 (executable)
@@ -10,7 +10,7 @@
 #
 LC_ALL=C
 PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-trm_ver="1.3.2"
+trm_ver="1.3.3"
 trm_sysver="unknown"
 trm_enabled=0
 trm_debug=0
@@ -148,7 +148,10 @@ f_check()
        then
                trm_ifstatus="false"
        else
-               ubus call network reload
+               if [ "${status}" = "false" ]
+               then
+                       ubus call network reload
+               fi
        fi
        while [ ${wait} -le ${trm_maxwait} ]
        do
@@ -300,6 +303,7 @@ f_main()
        local sta sta_essid sta_bssid sta_radio sta_iface active_essid active_bssid active_radio active_prio
 
        f_check "initial"
+       f_log "debug" "f_main ::: status: ${trm_ifstatus}, proactive: ${trm_proactive}"
        if [ "${trm_ifstatus}" != "true" ] || [ ${trm_proactive} -eq 1 ]
        then
                config_load wireless
@@ -320,7 +324,7 @@ f_main()
                f_log "debug" "f_main ::: iwinfo: ${trm_iwinfo:-"-"}, dev_list: ${trm_devlist:-"-"}, sta_list: ${trm_stalist:0:800}, faulty_list: ${faulty_list:-"-"}"
                for dev in ${trm_devlist}
                do
-                       f_log "debug" "f_main ::: dev: ${dev}"
+                       f_log "debug" "f_main ::: device: ${dev}"
                        if [ -z "$(printf "%s" "${trm_stalist}" | grep -o "\-${dev}")" ]
                        then
                                f_log "debug" "f_main ::: no station on '${dev}' - continue"
@@ -347,12 +351,12 @@ f_main()
                                                ([ "${dev}" != "${active_radio}" ] && [ "${active_prio}" = "true" ])
                                        then
                                                active_prio="true"
-                                               f_log "debug" "f_main ::: active station prioritized '${active_radio}/${active_essid}/${active_bssid:-"-"}' - break"
-                                               break
+                                               f_log "debug" "f_main ::: active station prioritized '${active_radio}/${active_essid}/${active_bssid:-"-"}' - continue"
+                                               continue 3
                                        fi
                                        if [ -z "${scan_list}" ]
                                        then
-                                               scan_list="$(f_trim "$(${trm_iwinfo} "${dev}" scan 2>/dev/null | \
+                                               scan_list="$(f_trim "$("${trm_iwinfo}" "${dev}" scan 2>/dev/null | \
                                                        awk 'BEGIN{FS="[/ ]"}/Address:/{var1=$NF}/ESSID:/{var2="";for(i=12;i<=NF;i++) \
                                                        if(var2==""){var2=$i}else{var2=var2" "$i}}/Quality:/{printf "%i,%s,%s\n",(100/$NF*$(NF-1)),var1,var2}' | \
                                                        sort -rn | awk '{ORS=",";print $0}')")"